package com.yoso.base.infrastructure.dao;

import com.yoso.base.entity.BaseEntity;
import com.yoso.base.service.BaseEntityExample;

import java.util.List;

public interface BaseMapper<E extends BaseEntity, M extends BaseEntityExample> {
    long countByExample(M example);

    int deleteByExample(M example);

    int deleteByPrimaryKey(String id);

    int insert(E record);

    int insertSelective(E record);

    List<E> selectByExample(M example);

    E selectByPrimaryKey(String id);

    int updateByExampleSelective(E record, M example);

    int updateByExample(E record, M example);

    int updateByPrimaryKeySelective(E record);

    int updateByPrimaryKey(E record);
}
